body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* 搜索页面样式 */
.search-page {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #334155;
}

.search-page .container {
    width: 100%;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    background: white;
}

.search-input:focus {
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    border: 2px solid #3b82f6;
}

.input-group-lg .btn {
    border-radius: 0 50px 50px 0;
    padding: 15px 25px;
}

/* 上传页面样式 */
.upload-page {
    background-color: #f8fafc;
    min-height: calc(100vh - 76px);
    padding-top: 20px;
}

/* 导航栏样式 */
.navbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: white !important;
}

.navbar-brand {
    font-size: 1.5rem;
    color: #3b82f6 !important;
    font-weight: 600;
}

/* 卡片样式 */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 15px;
    background: white;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 15px 15px 0 0 !important;
}

/* 内容项样式 */
.content-item {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 15px;
    background-color: #fff;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.content-item .timestamp {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.content-item .summary {
    font-style: italic;
    color: #475569;
    line-height: 1.6;
    font-size: 0.9rem;
}

.content-item .keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.content-item .content-preview {
    color: #64748b;
    line-height: 1.5;
    font-size: 0.95rem;
}

.content-item .content-title {
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

/* 内容类型图标优化 */
.content-type-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto;
}

/* 图片内容项特殊样式优化 */
.content-item img {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-item img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .content-item .row .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 15px;
    }
    
    .content-item .row .col-2 {
        flex: 0 0 20%;
        max-width: 20%;
    }
    
    .content-item .row .col-10 {
        flex: 0 0 80%;
        max-width: 80%;
    }
    
    /* 移动端图片样式调整 */
    .content-item img {
        max-height: 250px !important;
    }
    
    .content-item .d-flex[style*="min-height"] {
        min-height: 150px !important;
    }
}

/* 图片容器样式 */
.content-item .d-flex.justify-content-center.align-items-center {
    background: rgba(248, 250, 252, 0.5);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.content-item:hover .d-flex.justify-content-center.align-items-center {
    background: rgba(248, 250, 252, 0.8);
}

/* 关键词标签样式 */
.keyword-badge {
    margin-right: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #3b82f6;
    border-color: #3b82f6;
}

.keyword-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    background: #2563eb;
}

/* 图片预览样式 */
#imagePreview {
    max-height: 300px;
    margin-top: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-outline-primary {
    border-color: #3b82f6;
    color: #3b82f6;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border-color: #64748b;
    color: #64748b;
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #64748b;
    border-color: #64748b;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
}

/* 表单样式 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* 标签页样式 */
.nav-tabs .nav-link {
    border-radius: 10px 10px 0 0;
    border: none;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
}

.nav-tabs .nav-link:hover {
    border: none;
    color: #3b82f6;
    background: #f1f5f9;
}

/* 搜索结果样式 */
#mainSearchResults, #searchResults {
    margin-top: 30px;
}

#mainSearchResultsList, #searchResultsList {
    max-height: 600px;
    overflow-y: auto;
}

/* 最近内容样式 */
#recentContent {
    margin-top: 50px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#recentContentList .content-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-page .display-4 {
        font-size: 2rem;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    .content-item {
        padding: 15px;
    }
    
    .input-group-lg .btn {
        padding: 12px 20px;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 内容类型图标 */
.content-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
}

.content-type-text {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.content-type-image {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.content-type-url {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

/* 评论样式 */
.comment-item {
    background-color: #f8f9fa;
    border-radius: 12px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-bottom: 15px;
}

.comment-item:hover {
    background-color: #f1f3f5;
    transform: translateY(-2px);
}

/* 嵌套评论样式 */
.ms-4 {
    margin-left: 1.5rem !important;
    border-left: 3px solid #e9ecef;
}

.ms-8 {
    margin-left: 3rem !important;
    border-left: 3px solid #e9ecef;
}

.ms-12 {
    margin-left: 4.5rem !important;
    border-left: 3px solid #e9ecef;
}

.ms-16 {
    margin-left: 6rem !important;
    border-left: 3px solid #e9ecef;
}

/* 回复按钮样式 */
.reply-button {
    color: #6c757d;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.reply-button:hover {
    color: #3b82f6;
    text-decoration: none;
}

/* 取消回复按钮样式 */
#cancelReplyBtn {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
}

/* 警告框样式 */
.alert {
    border-radius: 12px;
    border: none;
}

/* 确保评论模态框显示在内容详情模态框之上 */
#commentsModal {
    z-index: 1060 !important;
}

/* 当评论模态框打开时，确保其背景遮罩层也在内容详情模态框之上 */
.modal-backdrop.show:nth-of-type(2) {
    z-index: 1055 !important;
}

.alert-success {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* 标题样式 */
.search-page h1 {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.search-page .lead {
    color: #64748b;
}